<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>登录页面</title>
		<link rel="stylesheet" type="text/css" href="../day03/css/bootstrap.min.css"/>
		<style type="text/css">
			body{
				background-color: rgba(197,204,178,50%);
			}
		</style>
	</head>
	<body>
		<div class="container" style="width: 300px;margin-top: 50px;">
			<fieldset>
				<legend>登录</legend>
				<div class="form-group">
					<label for="username">用户名：</label>
					<input class="form-control" 
						autocomplete="off"
						type="text" name="username" id="username" value="" />
				</div>
				<div class="form-group">
					<label for="password">密码：</label>
					<input class="form-control" 
						autocomplete="off" 
						type="password" name="password" id="password" value="" />
				</div>
				<div class="form-group">
					<!-- onclick 点击事件 -->
					<button class="btn btn-primary" onclick="save()">保存</button>
					<button class="btn btn-danger" onclick="jsclear()">取消</button>
				</div>
			</fieldset>
		</div>
	</body>
	<script type="text/javascript">
		function save(){
			let username = document.getElementById("username");
			console.log(username.value);
			let password = document.getElementById("password");
			console.log(password.value);
		}
		function jsclear(){
			document.getElementById("username").value = "";
			document.getElementById("password").value = "";
		}
	</script>
</html>
